public class Main {
    public static void main(String[] args) {
      /*  String phonenumber = "19843477288";
        //System.out.println(phonenumber.substring(0, 3));
        String head = phonenumber.substring(0,3);
        String tail = phonenumber.substring(7,11);
        System.out.println(head + "****" + tail);*/
        String talk = "SB玩的真好，CNM，下次别TM玩了，NMLGBD";
        String arr[] = {"SB","CNM","NMLGBD","TM"};
        for (int i = 0; i < arr.length; i++) {
            talk = talk.replace(arr[i],"***");
        }
        System.out.println(talk);
    }
}